package edu.vt.ece4564.bluetendance.attendance;

import edu.vt.ece4564.bluetendance.database.DatabaseConnector;

public class AttendanceRecordDeletionHandler implements Runnable {
	private int classMeetingID;
	private int studentID;
	public int recordsUpdated;

	public AttendanceRecordDeletionHandler(int classMeetingID, int studentID) {
		this.classMeetingID = classMeetingID;
		this.studentID = studentID;
	}

	@Override
	public void run() {
		DatabaseConnector dc = DatabaseConnector.get();

		dc.commandText = "call SP_DeleteAttendanceRecord('" + classMeetingID + "', '" + studentID + "');";

		recordsUpdated = dc.executeNonQuery();
	}
}
